const express = require('express')
const userRouter = require('./routers/user')

// 创建 app 对象
const app = express()

// 配置解析表单数据的中间件
app.use(express.urlencoded({ extended: false }))

// 注册路由
app.use('/user', userRouter)


// 监听3000端口，开启服务
app.listen(3000, () => {
  console.log('serve running at http://localhost:3000');
})